package org.jeecg.modules.question.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * 错题记录
 *
 * @author thankgod7
 * @version V1.0
 * @date 2022-01-19
 */
@Data
@TableName("ao_question_answer_record")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "ao_question_answer_record对象", description = "答题记录")
public class AoQuestionAnswerRecord implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键")
    private String id;

    /**
     * 单次答题ID
     */
    @ApiModelProperty(value = "单次答题ID")
    private String mainId;
    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人")
    private String createBy;
    /**
     * 创建日期
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建日期")
    private Date createTime;
    /**
     * 更新人
     */
    @ApiModelProperty(value = "更新人")
    private String updateBy;
    /**
     * 更新日期
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新日期")
    private Date updateTime;
    /**
     * 所属部门
     */
    @ApiModelProperty(value = "所属部门")
    private String sysOrgCode;
    /**
     * 题目
     */
    @Excel(name = "题目", width = 15, dictTable = "ao_question", dicText = "info_text", dicCode = "id")
    @Dict(dictTable = "ao_question", dicText = "info_text", dicCode = "id")
    @ApiModelProperty(value = "题目")
    private String questionId;
    /**
     * 用户
     */
    @Excel(name = "用户", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username")
    @Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username")
    @ApiModelProperty(value = "用户")
    private String username;
    /**
     * 题库类型
     */
    @Excel(name = "题库类型", width = 15, dictTable = "ao_category", dicText = "name", dicCode = "code")
    @Dict(dictTable = "ao_category", dicText = "name", dicCode = "code")
    @ApiModelProperty(value = "题库类型")
    private String categoryId;

    /**
     * 正确答案
     */
    @Excel(name = "正确答案", width = 15)
    @ApiModelProperty(value = "正确答案")
    private String correct;

    /**
     * 用户选项
     */
    @Excel(name = "用户选项", width = 15)
    @ApiModelProperty(value = "用户选项")
    private String selected;

    /**
     * 是否正确
     */
    @Excel(name = "是否正确", width = 15, dicCode = "yn")
    @Dict(dicCode = "yn")
    @ApiModelProperty(value = "是否正确")
    private String status;
}
